#ifndef UI_RECENTFILES_H
#define UI_RECENTFILES_H

#include <qstring.h>
#include <qstringlist.h>
#include "gui_export.h"

/**
 * This class can store recent files in a list.
 */
class GUI_EXPORT UI_RecentFiles {

public:
    UI_RecentFiles(int number);
    virtual ~UI_RecentFiles();

    void add(const QString& filename);

    /**
     * @return complete path and name of the file stored in the 
     * list at index i 
     */
    QString get(int i) {
        if (i<(int)files.count()) {
            return files[i];
        } else {
            return QString("");
        }
    }

    /** @return number of files currently stored in the list */
    int count() {
        return files.count();
    }

    /** @return number of files that can be stored in the list at maximum */
    int getNumber() {
        return number;
    }

private:
    int number;
    QStringList files;
};

#endif

